<template>
  <!-- 1. 创建.vue文件 -->
  <div class="box">
    <button @click="count--">-1</button>
    <span>{{ count }}</span>
    <button @click="count++">+1</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      count: 0,
    };
  },
};
</script>

// 👍 让style中的样式, 只对当前组件生效
<style scoped>
.box {
  color: red;
}
</style>
